#ifndef _IUPACKETICMP_HPP_
#define _IUPACKETICMP_HPP_

#include "iuPacket.hpp"

/**
 * @brief Differents types de requetes ICMP
 */
enum iuPacketICMPType
{
   ICMP_ECHO_REQUEST = 0,
   ICMP_ECHO_REPLY = 8
};

/**
 * @brief Classe representant un paquet ICMP
 */
class iuPacketICMP : public iuPacket
{
public:
   iuPacketICMP();
   
   uint16_t getBufferLen() const;
   uint16_t fromBuffer(const char *buffer, uint16_t len);
   uint16_t toBuffer(char *buffer) const;

   void     setType(uint8_t type);
   uint8_t  getType() const;
   void     setSize(uint16_t size);
   uint16_t getSize() const;

private:
   uint8_t m_type;
   uint16_t m_size;
};

#endif
